
<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>联通用户资费管理系统</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="vendor/animate.css/animate.css">
    <link rel="stylesheet" href="vendor/toastr/toastr.min.css">
    <link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.css">
    <link rel="stylesheet" href="stylesheets/css/style.css">
    <link rel="stylesheet" href="vendor/select2/css/select2.min.css">
    <link rel="stylesheet" href="vendor/select2/css/select2-bootstrap.min.css">
	<link href="JBox/plugins/Notice/jBox.Notice.css"  rel="stylesheet"/>
    <link href="JBox/plugins/Confirm/jBox.Confirm.css" rel="stylesheet" />
	<script type="text/javascript" src="javascripts/jquery.min.js"></script>
	<script type="text/javascript" src="javascripts/jquery.cookie.js" ></script>
	<script type="text/javascript" src="JBox/jBox.js"></script>
	<script type="text/javascript" src="JBox/plugins/Notice/jBox.Notice.js"></script>
	<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="vendor/nano-scroller/nano-scroller.js"></script>
	<script src="javascripts/examples/forms/advanced.js"></script>
	<script src="vendor/select2/js/select2.min.js"></script>
    <script>
    	var uidno="";
    	var uid=-1;
    	
    	if($.cookie("UM")==null||$.cookie("UM")=="null"){
    		window.location="login.html";
    	}
    	
    	$(document).ready(function(){
    		$(".user-name").text($.cookie("UMN"));
    		$(".user-profile").text($.cookie("UMC"));
    		$(".user-photo img").attr("title",$.cookie("UMN"));

    		
    		$(".log-out").click(function(){
    			$.cookie("UM",null);
    			$.cookie("UMN",null);
    			$.cookie("UMC",null);
    			window.location="login.html";
    		});
		  						    		
			$("#btnSave").unbind("click").bind("click",function(){
				var pcode=$.trim($("#psearch").val());    		
    			var pwd=$("#upwd").val();
    			var pwd2=$("#upwd2").val();
    			
	    		if(pcode==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '请输入要查询的手机号！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		}else if($("#puname").text()==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '请点击查询验证号码信息！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		}
	    		else if($.trim(pwd)==""||$.trim(pwd2)==""){
	    			new jBox('Notice', {width: 240,height: 45,content: '新密码没有填写完整！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
	    		
		    	}else if($.trim(pwd)!=$.trim(pwd2)){
		    		new jBox('Notice', {width: 240,height: 45,content: '两次输入密码不一致！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
					});
					return;
		    		
		   }else{
		   		$.ajax({
			          	type: "post",
		                dataType: "json",
		                contentType: "application/json",                
			          	url: "UnicomService.asmx/changeUPWD",
		                cache: false,
		                data: JSON.stringify({
		                	"UID":uid,
		                	"UPWD":pwd
		                }),
		                beforeSend: function () {
		    				
		                },
		                success: function (result) {
							new jBox('Notice', {width: 240,height: 45,content: '用户服务密码变更成功！',autoClose: 2000,
								color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
								position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
							});
							setTimeout(function(){window.location.reload()},2000);
		           		},
		           		error: function (msg) { console.log(msg.responseText); }
		         	});				
	    		}
			});									
    	});
    	
    	
    	function searchUser(sear){
    		if($.trim(sear)!=""){
    			$.ajax({
	          	type: "post",
                dataType: "json",
                contentType: "application/json",                
	          	url: "UnicomService.asmx/GetTargetUserPhone",
                cache: false,
                data: JSON.stringify({"PCODE":sear}),
                beforeSend: function () { },
                success: function (result) {
					if(result.d.length>0){
						$("#puname").text(result.d[0].userinfo_UNAME);
						$("#pstatus").text(result.d[0].phoneinfo_PSTATUS);
						$("#uidno").val(result.d[0].userinfo_UIDNO);
						
						uidno=result.d[0].userinfo_UIDNO;
						uid=result.d[0].userinfo_ID;
					}else{
						alert("查无此号！");
					}
           		},
           		error: function (msg) { console.log(msg.responseText); }
         	});
    		}else{
    			new jBox('Notice', {width: 240,height: 45,content: '请输入要查询的手机号！',autoClose: 2000,
						color: 'red',animation: {open: 'slide:right bottom',close: 'slide:top'},
						position: {x: ($(window).width()-240)/2,y: ($(window).height())/2}
				});
				$("#psearch").focus();
    		}
    	}
    </script>
    <style>
		@media(max-width: 767px) {
			#btnSearch{
				margin-top: 15px;
				margin-left: 15px;
			}
		}
	</style>
</head>
<body>
	<div class="wrap">
    <div class="page-header">
        <div class="leftside-header">
            <div class="logo">
                <a href="index.html" class="on-click">
                    <img alt="logo" src="images/header-logo.png" height="50"/>
                </a>
            </div>
            <div id="menu-toggle" class="visible-xs toggle-left-sidebar" data-toggle-class="left-sidebar-open" data-target="html">
                <i class="fa fa-bars" aria-label="Toggle sidebar"></i>
            </div>
        </div>
        <div class="rightside-header">
            <div class="header-middle"></div>
            <div class="header-section" id="search-headerbox">
                <input type="text" name="search" id="search" placeholder="Search...">
                <i class="fa fa-search search" id="search-icon" aria-hidden="true"></i>
                <div class="header-separator"></div>
            </div>
            <div class="header-section hidden-xs" id="notice-headerbox">
                <div class="notice" id="messages-notice">
                    <i class="fa fa-comments-o" aria-hidden="true"></i>
                    <span><i class="fa fa-exclamation-circle" aria-hidden="true"></i></span>
                    <div class="dropdown-box basic">
                        <div class="drop-header ">
                            <h3><i class="fa fa-comments-o" aria-hidden="true"></i> 信息</h3>
                            <span class="number">1</span>
                        </div>
                        <div class="drop-content">
                            <div class="widget-list list-left-element">
                                <ul>
                                    <li>
                                        <a href="#">
                                            <div class="left-element"><img alt="John Doe" src="images/avatar_1.jpg" /></div>
                                            <div class="text">
                                                <span class="title">John Doe</span>
                                                <span class="subtitle">Lorem ipsum dolor sit.</span>
                                            </div>
                                        </a>
                                    </li>                                   
                                </ul>
                            </div>
                        </div>
                        <div class="drop-footer">
                            <a>查看所有信息</a>
                        </div>
                    </div>
                </div>
                <div class="header-separator"></div>
            </div>
            <div class="header-section" id="user-headerbox">
                <div class="user-header-wrap">
                    <div class="user-photo">
                        <img src="images/user-avatar.jpg" alt="" />
                    </div>
                    <div class="user-info">
                        <span class="user-name"></span>
                        <span class="user-profile"></span>
                    </div>
                    <i class="fa fa-plus icon-open" aria-hidden="true"></i>
                    <i class="fa fa-minus icon-close" aria-hidden="true"></i>
                </div>
                <div class="user-options dropdown-box">
                    <div class="drop-content basic">
                        <ul>
                            <li> <a href="pages_lock-screen.html"><i class="fa fa-lock" aria-hidden="true"></i> 锁定系统</a></li>
                            <li> <a href="pages_user-profile.html"><i class="fa fa-user" aria-hidden="true"></i> 个人信息</a></li>
                            <li><a href="#"><i class="fa fa-cog" aria-hidden="true"></i>系统设置</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="header-separator"></div>
            <div class="header-section">
                <i class="fa fa-sign-out log-out" aria-hidden="true"></i>
            </div>
        </div>
    </div>
    <div class="page-body">
        <div class="left-sidebar">
            <div class="left-sidebar-header">
                <div class="left-sidebar-title">功能导航</div>
                <div class="left-sidebar-toggle c-hamburger c-hamburger--htla hidden-xs" data-toggle-class="left-sidebar-collapsed" data-target="html">
                    <span></span>
                </div>
            </div>
            <div id="left-nav" class="nano">
                <div class="nano-content">
                    <nav>
                        <ul class="nav" id="main-nav">
                            <li class="active-item"><a href="index.html"><i class="fa fa-home" aria-hidden="true">                            	
                            </i><span>主页</span></a></li>
                            <li >
                                <a href="newUser.html"><i class="fa fa-cubes" aria-hidden="true"></i><span>用户开户</span></a>                                
                            </li>
                            <li >
                                <a href="delUser.html"><i class="fa fa-pie-chart" aria-hidden="true"></i><span>用户销户</span></a>                                
                            </li>
                            <li class="has-child-item open-item">
                                <a><i class="fa fa-columns" aria-hidden="true"></i><span>业务办理</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="setMenu.html">资费套餐</a></li>
                                    <li><a href="setFlow.html">流量套餐</a></li>
                                    <li><a href="cruise.html">国际业务</a></li>
                                    <li><a href="lockPhoneCode.html">停机复机</a></li>
                                    <li><a href="changeUPWD.html">服务密码</a></li>
                                </ul>
                            </li>
                            <li class="has-child-item close-item">
                                <a><i class="fa fa-table" aria-hidden="true"></i><span>充值缴费</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="userRecharge.html">缴费/充值卡</a></li>
                                    <li><a href="scoreCharge.html">积分兑换</a></li>
                                </ul>
                            </li>
                            <li class="has-child-item close-item">
                                <a><i class="fa fa-files-o" aria-hidden="true"></i><span>系统管理</span></a>
                                <ul class="nav child-nav level-1">
                                    <li><a href="pages_lock-screen.html">锁定系统</a></li>
                                    <li><a href="pages_user-profile.html">个人信息</a></li>
                                    <li><a href="#">系统设置</a></li>
                                </ul>
                            </li>
                                </ul>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
         <div class="content">
            <div class="content-header">
                <div class="leftside-content-header">
                    <ul class="breadcrumbs">
                        <li><i class="fa fa-columns" aria-hidden="true"></i><a href="index.html">主页</a></li>
                        <li><a>修改服务密码</a></li>
                    </ul>
                </div>
            </div>
            <div class="row animated fadeInUp">
                <div class="col-sm-12">
                    <h4 class="section-subtitle"><b>用户信息</b></h4>
                    <div class="panel">
                        <div class="panel-content">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-horizontal form-stripe">
                                        <div class="form-group">
                                            
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="psearch" placeholder="要查询的电话号码">
                                            </div>
                                            <button onclick=searchUser($('#psearch').val()) class="col-sm-2 btn btn-warning" id="btnSearch" style="width:150px;color:white;margin-bottom:0px;border-radius: 6px;">查询</button>
                                        </div>
                                      	<div class="form-group">
                                           <div class="col-sm-6">
                                           	<label>开户人：</label>
                                           	<label id="puname" style="color: darkorange;"></label>
                                           </div>
                                            <div class="col-sm-6">
                                           	<label>号码状态：</label>
                                           	<label id="pstatus" style="color: darkorange;"></label>
                                           </div>
                                        </div>
                                        <div class="form-group">
                                          <div class="col-sm-12" style="margin-top: 20px;">
                                            	<label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">身份证：</label>
                                            	<div class="col-sm-11">
                                                	<input type="text" class="form-control" id="uidno" placeholder="请输入用户身份证">
                                            	</div>
                                            </div>
                                             <div class="col-sm-12" style="margin-top: 20px;">
                                            	<label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">新密码：</label>
                                            	<div class="col-sm-11">
                                                	<input type="password" class="form-control" id="upwd" placeholder="请输入新密码">
                                            	</div>
                                            </div>
                                             <div class="col-sm-12" style="margin-top: 20px;">
                                            	<label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">重复：</label>
                                            	<div class="col-sm-11">
                                                	<input type="password" class="form-control" id="upwd2" placeholder="请再次输入新密码">
                                            	</div>
                                            </div>
                                        </div>
                                        
                                        
                                            <label for="placeholder" class="col-sm-1 control-label" style="text-align: left;">说明：</label>
                                            <div class="col-sm-11">
                                                <p class="control-label" style="color: darkorange;text-align: left;">服务密码为六位数字。</p>
                                            </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
 
                <div class="col-sm-12" style="text-align: center;">            
                    <a class="btn btn-wide btn-warning" id="btnSave" data-toggle="modal" >确 定</a>
                </div>
            </div>
        </div>
        <a href="#" class="scroll-to-top"><i class="fa fa-angle-double-up"></i></a>
    </div>
   
</div>
</body>

	<script src="javascripts/template-script.min.js"></script>
	<script src="javascripts/template-init.min.js"></script>
</html>
